<template>
  <ant-modal
    modalWidth="800"
    modalHeight="550"
    :visible="open"
    :modal-title="formTitle"
    :adjust-size="true"
    @cancel="cancel"
  >
    <a-form-model
      ref="form"
      :model="form"
      :rules="rules"
      slot="content"
      layout="vertical"
    >
      <a-row :gutter="32">
        <a-col :span="12">
          <a-form-model-item label="编号" prop="code">
            <a-input v-model="form.code" placeholder="请输入编号" />
          </a-form-model-item>
        </a-col>
        <a-col :span="12">
          <a-form-model-item label="名称" prop="name">
            <a-input v-model="form.name" placeholder="请输入名称" />
          </a-form-model-item>
        </a-col>
        <a-col :span="12">
          <a-form-model-item label="街道" prop="streetCode">
            <a-input v-model="form.streetCode" placeholder="请输入街道" />
          </a-form-model-item>
        </a-col>
        <a-col :span="12">
          <a-form-model-item label="所属县" prop="areaCode">
            <a-input v-model="form.areaCode" placeholder="请输入所属县" />
          </a-form-model-item>
        </a-col>
        <a-col :span="12">
          <a-form-model-item label="所属市" prop="cityCode">
            <a-input v-model="form.cityCode" placeholder="请输入所属市" />
          </a-form-model-item>
        </a-col>
        <a-col :span="12">
          <a-form-model-item label="所属省" prop="provinceCode">
            <a-input v-model="form.provinceCode" placeholder="请输入所属省" />
          </a-form-model-item>
        </a-col>
        <a-col :span="12">
          <a-form-model-item label="级别" prop="level">
            <a-input-number v-model="form.level" :min="0" style="width: 100%" />
          </a-form-model-item>
        </a-col>
        <a-col :span="12">
          <a-form-model-item label="排序" prop="sort">
            <a-input-number v-model="form.sort" :min="0" style="width: 100%" />
          </a-form-model-item>
        </a-col>
      </a-row>
    </a-form-model>
    <template slot="footer">
      <a-button @click="cancel"> 取消 </a-button>
      <a-button type="primary" @click="submitForm"> 保存 </a-button>
    </template>
  </ant-modal>
</template>
<script>
import SysAreaAddForm from "./SysAreaForm";
export default {
  ...SysAreaAddForm,
};
</script>
